import axios from 'axios'
import React, { useEffect } from 'react'

export default function Login() {
  const [data, setData] = React.useState()
  useEffect(() => {
    getMessage()
  }, [])
  const getMessage = async () => {
    let { data: { data, text } } = await axios.get('http://localhost:3000/message')
    setData(data)
  }
  return (
    <div>
      <h1>login</h1> {/* login page */}
      <button>login</button> {/* login button */}
      <button>signup</button> {/* signup button */}
      <div dangerouslySetInnerHTML={{__html:data}} onClick={()=>{getMessage()}}>

      </div>
    </div>
  )
}
